<template>
    <section>
        <!--列表-->
        <el-table :data="list" highlight-current-row   @selection-change="selsChange" style="width: 100%;">
            <el-table-column type="selection" width="55">
            </el-table-column>
            <el-table-column type="index" width="60">
            </el-table-column>
            <el-table-column prop="name" label="姓名" width="120" sortable>
            </el-table-column>
           <!-- <el-table-column prop="sex" label="性别" width="100" :formatter="formatSex" sortable>
            </el-table-column>-->
            <el-table-column prop="manager" label="年龄" width="100" sortable>
            </el-table-column>
            <el-table-column prop="dirPath" label="生日" width="120" sortable>
            </el-table-column>
            <el-table-column prop="sn" label="地址" min-width="180" sortable>
            </el-table-column>
            <el-table-column label="操作" width="150">
                <template scope="scope">
                    <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                    <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
        <!--分页条-->
        <el-col :span="24" class="toolbar">
            <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button>
            <el-pagination @size-change="handleSizeChange" layout="sizes,prev, pager, next" @current-change="handleCurrentChange"  :page-sizes="[5, 10, 15, 20]" :page-size="pageSize" :total="total" style="float:right;">
            </el-pagination>
        </el-col>
    </section>
</template>

<script>
    export default {
        name: "employee",
        data(){
            return {
                list: []
            }
        },
        methods:{
            selsChange(){},
            handleDel(index,row){
                console.log(index)
                console.log(row)
            },
           handleEdit(){}
        },
        mounted(){
         //调用后台接口，获取部门列表数据集合
            this.$http.post("/dept/testFindAll").then((data)=>{
                console.debug(data.data);
                this.list=data.data;
            })
        }
    }
</script>

<style scoped>

</style>